package com.sean.main.service.impl;


import com.sean.main.dao.VideoDao;
import com.sean.main.domain.VideoDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


@Service
@Transactional
public class VideoServiceImpl {
    @Autowired
    private VideoDao videoDao;


    public VideoDO get(Integer idvideo) {
        return videoDao.get(idvideo);
    }

    public List<VideoDO> listUnQueue() {

        Map<String, Object> unqueueMap = new HashMap<String, Object>();
        unqueueMap.put("status", "待检测");
        return list(unqueueMap);
    }

    public List<VideoDO> list(Map<String, Object> map) {
        return videoDao.list(map);
    }

    public int count(Map<String, Object> map) {
        return videoDao.count(map);
    }

    public int save(VideoDO video) {
        return videoDao.save(video);
    }

    public int update(VideoDO video) {
        return videoDao.update(video);
    }

    public int remove(Integer idvideo) {
        return videoDao.remove(idvideo);
    }

    public int batchRemove(Integer[] idvideos) {
        return videoDao.batchRemove(idvideos);
    }

}
